// @ts-ignore
/* eslint-disable */
import request from '@/request';

/** 此处后端没有提供注释 POST /question/create */
export async function createQuestion(
  body: API.QuestionCreateRequest,
  options?: { [key: string]: any },
) {
  return request<API.BaseResponseBoolean>('/question/create', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}

/** 此处后端没有提供注释 POST /question/delete */
export async function deleteQuestion(body: number, options?: { [key: string]: any }) {
  return request<API.BaseResponseBoolean>('/question/delete', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}

/** 此处后端没有提供注释 GET /question/list */
export async function getQuestionList(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.getQuestionListParams,
  options?: { [key: string]: any },
) {
  return request<API.BaseResponseListQuestionVO>('/question/list', {
    method: 'GET',
    params: {
      ...params,
      appSearchRequest: undefined,
      ...params['appSearchRequest'],
    },
    ...(options || {}),
  });
}

/** 此处后端没有提供注释 POST /question/update */
export async function updateQuestion(
  body: API.QuestionUpdateRequest,
  options?: { [key: string]: any },
) {
  return request<API.BaseResponseBoolean>('/question/update', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}
